EjectDisk
by Jason Anderson
©1994-96 Beyond Midnight Software (v2.1.0 November 1996)
Shareware $10

About It

At heart, I’m a lazy person. If I have the choice of doing something using three key presses, or doing it using two key presses, I will use the two key presses every time (doesn’t everyone?). Because I’m so lazy, I used to hate ejecting disks of all sorts (floppies, CDs and removables). If I was typing at the keyboard I had to pick up the mouse, click on the disk icon, and drag the disk icon to the trash. That's why I wrote EjectDisk. Now all I have to do is press a single key (on my extended keyboard), and any floppy disks, CD–ROMs or Zip/SyQuest/Jaz disks that are currently mounted are unmounted and ejected.

EjectDisk comes as an control panel. This allows you to customise which keys will eject what type of disk (or to disable ejecting a particular type if you don’t want to be able to do so). EjectDisk requires System 7 or later (it checks this at startup, and if you aren’t running System 7 or later it won’t install itself).

EjectDisk is different from using Command-Y in the Finder in two ways. First, to use Command-Y you have to select the disk before you can eject it, where as when using EjectDisk you don’t. Secondly, you don’t have to be in the Finder to eject the disk (which can be handy at times).

Installing EjectDisk

Simply drag EjectDisk onto your System Folder, and release it. The computer will ask you if you want to put it in the Control Panels folder. Click OK (or press return). Once you have restarted your computer, EjectDisk will be installed and ready for use!

Using EjectDisk

The first thing you should do is set up what keys you want to use to eject floppy disks, CD-ROMs and Zip/SyQuest/Jaz disks. You can set up different keys for each, and can disable ejecting of a particular type if you want. By default, EjectDisk has the keys set at Command-Escape for all three, with the ejecting of floppy disks the only option turned on. To change the key to use, simply click on the “Set…” button for the key you wish to change and type the new combination.

The “Swallow Keypress” option indicates whether the computer should ignore the keypress used to eject the disks (“swallow” it), or pass it through to whatever applications are currently running. Normally you will want to leave this option set.

Finally, EjectDisk has an option to eject any CD-ROMs that are in the computer when the computer is shut down (not restarted).

Removing EjectDisk

If you later decide that you don’t want to keep EjectDisk, simply remove it from your Control Panels folder and restart.

Possible Problems

• Occasionally, if you eject a floppy or Zip/SyQuest/Jaz disk and then put it back in the computer, you will find that the last thing you did to the disk is not “remembered”. This is because the Finder hasn’t written the changes you have made to the disk. Normally this only occurs when you open/close windows, but it can also occur when renaming the disk or files on the disk IF THE EDIT FIELD IS STILL ACTIVE WHEN YOU EJECT IT. In other words, click off the item you are renaming for the disk to “remember” the change. Unfortunately there doesn’t appear to be a way around this problem (other than using really nasty hacks which would probably break under future systems).

• Sometimes when you invoke EjectDisk to eject a disk (of any type) the computer will beep and do nothing. This can mean one of three things: you have a program that is currently running from the disk, a program currently running is accessing something on the disk, or the front most process (application) is a Desk Accessory and you are tying to eject a floppy disk. The first two cases can be solved by simply quit the offending program(s). The last case occurs due to a documented bug in System 7, which basically means that if EjectDisk did what it normally does when a DA is at the front, the computer would crash. If you really have to eject the disk in this case, simply switch to another application and everything should work fine.

• Changing the keys in the control panel can sometimes get a bit tricky if you have the “Swallow Keypress” option set. An example will best explain this: Suppose you have the key to eject floppy disks set as F15. You open the control panel, and change that key to F12. Without closing the control panel, you decide that changing it was a silly idea, and want to change it back to F15. You go to change it, but for some reason the control panel is ignoring your key presses. The reason is that EjectDisk doesn’t save any of the changes you make in the window until after you close the control panel, so in the above case EjectDisk is still taking the keypress to mean eject the disk now (and swallowing the keypress, so the control panel never receives it). The solution, as you may have guessed, is to first close the control panel, and then open it again and change the keys back to what they were before.

• There is a problem with setting the function keys to eject disks if Aladdin's Desktop Tools is installed (in particular the Desktop Makeover control panel). The way around this problem (for now) is to disable Desktop Makeover while you set up the function keys to eject the disks, and renewably it once the keys are set.

The Money Plea

EjectDisk is distributed as shareware, with a 30 day trial period. If you are still using EjectDisk after 30 days then you are expected to register it. To remind you, after 30 days EjectDisk will display a message every time you restart the computer (EjectDisk will still work - it won’t be disabled in any way). The shareware fee for EjectDisk is $10. Registration is handled by Kagi, so it couldn’t be simpler. Simply open the Register program that accompanies EjectDisk, fill in the appropriate information, save or print the resulting registration form, and send it to Kagi at:

          Kagi
          1442-A Walnut Street #392-VM
          Berkeley, California 94709-1405
          USA

If paying with Credit Card or First Virtual, you can email or fax the data to Kagi. Their email address is sales@kagi.com and their fax number is +1 510 652-6589. You can either Copy the data from Register and paste into the body of an email message or you can Save the data to a file and you can attach that file to an email message. There is no need to compress the data file, it's already pretty small. If you have a fax modem, just Print the data to the Kagi fax number. 

Payments sent via email are processed within 3 to 4 days. You will receive an email acknowledgement when it is processed. Payments sent via fax take up to 10 days and if you provide a correct internet email address you will receive an email acknowledgement. 

You can pay with a wide variety of cash from different countries but at present if you pay via check, it must be a check drawn in US Dollars. Kagi cannot accept checks in other currencies, the conversion rate for non-USD checks is around USD 15 per check and that is just not practical.

If you have a purchasing department, you can enter all the data into the Register program and then select Invoice as your payment method. Print three copies of the form and send it to your accounts payable people. You might want to highlight the line that mentions that they must include a copy of the form with their payment.

Kagi Shareware can not invoice your company – you need to act on our behalf and generate the invoice and handle all the paperwork on your end.

Please do not fax or email payment forms that indicate Cash, Check or Invoice as the payment method. As far as we know, there is still no technology to transfer physical objects via fax or email and without the payment the form cannot be processed.

Once you have registered, you will receive a registration form back via email if you have an email address, or by regular post if you don’t (everybody gets a form by post, but those with email addresses get the information they need faster). Enter the information exactly as it appears on the form in the “Enter Code…” dialog. If you enter the information correctly, EjectDisk will display a short message to say you are now registered. If you get a message saying that you entered the information incorrectly, make sure you typed your name, the number of copies you are registering and the registration code exactly as they appear on the form.

Roundup

Well, that's all there is to say about EjectDisk. It has proven itself to be useful, and hopefully other people will think so too. Any comments, suggestions or bug reports can be sent via email to midnight@kagi.com.

Special Thanks To…

Special thanks must go to Jason Larson, who beta tested this version of EjectDisk rather vigorously and provided several suggestions - without his help this version would have been delayed in being released. Thanks must also go to David Gray and Graham Nicholson for testing the code to eject Zip/SyQuest/Jaz disks.

Distribution

EjectDisk is ©1994–96 Beyond Midnight Software. It can be freely distributed as long as it is not modified and there’s no charge for it, but it may not be included in any commercial package without our consent.
•  All online services and bulletin boards may make it available to their users at no charge other than the normal connection fees.
•  All non–profit user groups may distribute it at no charge.
•  All magazines may publish it on floppy disk without asking us first, as long as we get a copy of the issue containing our software.
•  All CD–ROM shareware collections and CD–ROM magazines may include it without our prior consent, as long as we get either a copy of the CD–ROM or an offer to buy the CD–ROM at a discounted price.
•  All redistribution companies such as Educorp may distribute it, as long as we get a copy of each media containing our software and a catalogue of the company’s offerings (where applicable).

Disclaimer

EjectDisk is supplied “as is”. Beyond Midnight Software makes no warranties, either expressed or implied, and will not be liable for any special, incidental, consequential or indirect damages, including but not limited to loss of data, loss of business profits, business interruption or psychological damage. The person using this software bears all risk as to its quality and performance. By using this software, you are subject and agree to the terms in this disclaimer.

Programming Notes

EjectDisk is written with the aid of Extension Shell, by Dair Grant, and CW CDEV Framework, by Matthew E. Axsom. Both of these packages allow the programmer to concentrate on what they are writing, rather than the mechanics of writing a control panel or extension. If you are interested in programming either control panels or extensions, I suggest you grab these packages and have a look at them. They should be available at all Info-Mac and Umich mirrors.

EjectDisk was originally written and compiled using THINK C 5.0.4. This version was almost totally rewritten using CodeWarrior 10.

Version History

• v2.1.0 (November ‘96)
     - Added the ability to eject Zip/SyQuest/Jaz disks.
     - Added the option to eject any CDs in the computer when the computer is shut down.
     - Fixed a bug with ejecting CDs if a file was open on the CD.
     - Minor code changes.

• v2.0.0 - Finally!! (September ‘96)
     - Changed EjectDisk into a control panel.
     - Added the ability to eject CD-ROMs.
     - Which keys used to eject disks can now be changed.
     - Added the option to “swallow” the key press used to eject the disk/CD-ROM.
     - Added the option to show/not show the icon at startup.
     - Removed the FKEY version of EjectDisk (did anyone actually use it??)
     - Made EjectDisk shareware, using the Kagi registration system.

• v1.0.3 (November ‘94)
     - Documentation update (mention DA bug found in EjectDisk).

• v1.0.2 (August ‘94)
     - EjectDisk used to crash if it was used when a Desk Accessory was the front most process (apparently due to a documented bug in System 7). EjectDisk now checks to see if a DA is at the front, and simply beeps and does nothing if there is.

• v1.0.1 (August ‘94)
     - Fixed a bug in the extension that caused incompatibilities with some extensions that loaded before EjectDisk (Apollo was one - thanks to Jean-Luc Haibette for finding this bug).
     - Fixed a bug with which any function key, not just F15, would cause EjectDisk to activate.

• v1.0.0 (July ‘94)
     - Initial release.